#include "builder.h"
#include "product.h"
#include <QDebug>

Builder::~Builder()
{

}

Builder::Builder()
{

}

ConcreteBuilder::ConcreteBuilder()
{
    _product = new Product();
}

ConcreteBuilder::~ConcreteBuilder()
{

}

void ConcreteBuilder::BuildPartA(const QString buildPara)
{
    qDebug()<<"BuildPartA "<<buildPara;
    _product->ProducePart(buildPara);
}

void ConcreteBuilder::BuildPartB(const QString buildPara)
{
    qDebug()<<"BuildPartB "<<buildPara;
    _product->ProducePart(buildPara);
}

void ConcreteBuilder::BuildPartC(const QString buildPara)
{
    qDebug()<<"BuildPartC "<<buildPara;
    _product->ProducePart(buildPara);
}

Product *ConcreteBuilder::GetProduct()
{
//    BuildPartA("pre-defined");
//    BuildPartB("pre-defined");
//    BuildPartC("pre-defined");

    return _product;
}
